Efficient Computation of Middle Levels Gray Codes
نویسندگان
چکیده
For any integer n ≥ 1 a middle levels Gray code is a cyclic listing of all bitstrings of length 2n+1 that have either n or n+1 entries equal to 1 such that any two consecutive bitstrings in the list differ in exactly one bit. The question whether such a Gray code exists for every n ≥ 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. Mütze. Proof of the middle levels conjecture. arXiv:1404.4442, 2014]. In this work we provide the first efficient algorithm to compute a middle levels Gray code. For a given bitstring, our algorithm computes the next ` bitstrings in the Gray code in time O(n`(1 + n` )), which is O(n) on average per bitstring provided that ` = Ω(n).
منابع مشابه
A constant-time algorithm for middle levels Gray codes
For any integer n ≥ 1 a middle levels Gray code is a cyclic listing of all nelement and (n+ 1)-element subsets of {1, 2, . . . , 2n+ 1} such that any two consecutive subsets differ in adding or removing a single element. The question whether such a Gray code exists for any n ≥ 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recentl...
متن کاملGray Images of Constacyclic Codes over some Polynomial Residue Rings
Let be the quotient ring where is the finite field of size and is a positive integer. A Gray map of length over is a special map from to ( . The Gray map is said to be a ( )-Gray map if the image of any -constacyclic code over is a -constacyclic code over the field . In this paper we investigate the existence of ( )-Gray maps over . In this direction, we find an equivalent ...
متن کاملThe effect of intracerebroventricular injection of CGRP on pain behavioral responses and monoamines concentrations in the periaqueductal gray area in rat
Objective(s): Calcitonin gene related peptide (CGRP) receptors are widely distributed in the central nervous system. The aim of this study was to investigate the effects of intracerebroventricular (ICV) injection of CGRP on pain behavioral responses and on levels of monoamines in the periaqueductal gray area (PAG) during the formalin test in rats.Materials and Methods: Twenty-four male rats wer...
متن کاملProperties of Gray and Binary Representations
Representations are formalized as encodings that map the search space to the vertex set of a graph. We define the notion of bit equivalent encodings and show that for such encodings the corresponding Walsh coefficients are also conserved. We focus on Gray codes as particular types of encoding and present a review of properties related to the use of Gray codes. Gray codes are widely used in conj...
متن کاملMonotone Gray Codes and the Middle Levels Problem
An n-bit binary Gray code is an enumeration of all n-bit binary strings so that successive elements differ in exactly one bit position; equivalently, a hamilton path in the Hasse diagram of Bn (the partially ordered set of subsets of an n-element set, ordered by inclusion.) We construct, for each n, a hamilton path in Bn with the following additional property: edges between levels i− 1 and i of...
متن کامل